import React from 'react'
import './index.css'
import { useLocation } from 'react-router-dom';
const DetailComponent = () => {
   const {state}=useLocation()
   const goodsData=state
   console.log(goodsData);

   if (!goodsData) {
    return null;
  }

  return (
    <div>
        
<div className='detail'>
    {/* <div>{goodsData.name}</div> */}
<tr>
    <td>品牌：静啦</td>
    <td>材质：其他</td>
    <td>风格：日韩</td>
</tr>

<tr>
    <td>成色：全新</td>
    <td>发饰分类：边夹</td>
    <td>价格区间：1.00-9.99元</td>
</tr>

<tr>
    <td>新奇特：新鲜出炉</td>
    <td>颜色分类：限时特惠热销20件套</td>
    <td>上市时间：2023年秋季</td>
</tr>

<tr>
    <td>货号：JL -Y1109-ZX2</td>
    <td>镶嵌材质：未镶嵌</td>
    <td>是否商场同款：否</td>
</tr>
</div>

<div className='scroll'>
  
    {goodsData.childrenimage.map((image, index) => (
      <img key={index} src={require(`../../../static/image/` + image)} alt="" />
    ))}
 
</div>

    </div>
  )
}
export default DetailComponent;